// reg_test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

void Test();

int _tmain(int argc, _TCHAR* argv[])
{
	Test();

	return 0;
}

void Test()
{
	bool b;
	tstring tcs;
	vector<u8> vctBinary;
	u32 data32;
	u64 data64;
	vector<tstring> vctData;
	tstring tcsExp;
	u8 pData[8] = {0x01, 0x02, 0x03, 0x04, 0xff, 0x67, 0x32, 0x52};

	tcs = _T("123 456");
	vctData.push_back(_T("AAA"));
	vctData.push_back(_T("BBBB"));
	vctData.push_back(_T("CCCCC"));
	data32 = 0x00882233;
	data64 = 0x00882233ffeeccaa;
	tcsExp = _T("%systemroot%\\123.exe");

	b = cz_reg_CreateKeyT(HKEY_CURRENT_USER, _T("RegTest\\OP1"));

	b = cz_reg_SetStringT(HKEY_CURRENT_USER, _T("RegTest"), _T("Str"), tcs);
	b = cz_reg_SetBinaryT(HKEY_CURRENT_USER, _T("RegTest"), _T("Bin"), pData, 8);
	b = cz_reg_SetU32T(HKEY_CURRENT_USER,  _T("RegTest"), _T("Dw"), data32);
	b = cz_reg_SetU64T(HKEY_CURRENT_USER, _T("RegTest"), _T("Qw"), data64);
	b = cz_reg_SetMultiStringT(HKEY_CURRENT_USER, _T("RegTest"), _T("Mul"), vctData);
	b = cz_reg_SetExpandStringT(HKEY_CURRENT_USER, _T("RegTest"), _T("Exp"), tcsExp);

	b = cz_reg_GetStringT(HKEY_CURRENT_USER, _T("RegTest"), _T("Str"), tcs);
	b = cz_reg_GetBinaryT(HKEY_CURRENT_USER, _T("RegTest"), _T("Bin"), vctBinary);
	b = cz_reg_GetU32T(HKEY_CURRENT_USER, _T("RegTest"), _T("Dw"), data32);
	b = cz_reg_GetU64T(HKEY_CURRENT_USER, _T("RegTest"), _T("Qw"), data64);
	b = cz_reg_GetMultiStringT(HKEY_CURRENT_USER, _T("RegTest"), _T("Mul"), vctData);
	b = cz_reg_GetExpandStringT(HKEY_CURRENT_USER, _T("RegTest"), _T("Exp"), tcs);

	b = cz_reg_DeleteValueT(HKEY_CURRENT_USER, _T("RegTest"), _T("Mullll"));
	b = cz_reg_DeleteKeyT(HKEY_CURRENT_USER, _T("RegTest"));
}
